# File: startAS.py
# Starts the Administration Server

# Get the properties from ANT
user='${ANT_AS_USER}'
password='${ANT_AS_PASS}'
nm_ip='${ANT_NM_IP}'
nm_port='${ANT_NM_PORT}'
nm_type='${ANT_NM_TYPE}'
domain_home='${ANT_DOMAIN_HOME}' + '/' + '${ANT_DOMAIN_NAME}'
domain_name='${ANT_AS_NAME}'
as_name='${ANT_AS_NAME}'
arg = "Arguments=\"${ANT_AS_ARGS} \""

print "Connecting to Node Manager with nmConnect(user,password, nm_ip, nm_port,domain_name,domain_home, nm_type)"
nmConnect(user,password, nm_ip, nm_port,domain_name,domain_home, nm_type)

prps = makePropertiesObject (arg)
nmStart(as_name, props=prps)
#nmStart(domain_name, props=prps)
